package com.boot.unity.api.modules.train.controller;

import com.boot.unity.api.modules.listener.StudentSyncService;
import com.boot.unity.api.modules.train.dao.StuDao;
import com.boot.unity.api.modules.train.entity.Stu;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author XH.M
 * @create 2020-10-29 8:54
 */
//@Api(tags = "stu测试")
//@RequestMapping(value = "/stu")
//@RestController
@AllArgsConstructor
@Deprecated
public class StuController {
    private final StuDao stuDao;
    private final StudentSyncService studentSyncService;

    //@ApiOperation(value = "stu测试")
    //@GetMapping
    public List<Stu> list(){
        return stuDao.list();
    }


    @ApiOperation(value = "推送测试")
    @PostMapping
    public void push(@RequestParam("cardNo") String cardNo){
        studentSyncService.studentSync(cardNo);
    }
}
